﻿using ApisixSDK.Common;
using Newtonsoft.Json;
using System.Collections.Generic;

namespace ApisixSDK.Admin.model
{
    public class SSL : BaseModel
    {
        /// <summary>
        /// [必需]HTTPS证书
        /// </summary>
        [JsonProperty(propertyName: "cert")]
        public string Cert { get; set; }
        /// <summary>
        /// [必需]HTTPS证书私钥
        /// </summary>
        [JsonProperty(propertyName: "key")]
        public string Key { get; set; }
        /// <summary>
        /// [可选]当你想给同一个域名配置多个证书时，除了第一个证书需要通过 cert 传递外，剩下的证书可以通过该参数传递上来
        /// </summary>
        [JsonProperty(propertyName: "certs")]
        public IList<string> Certs { get; set; }
        /// <summary>
        /// [可选]certs 对应的证书私钥，注意要跟 certs 一一对应
        /// </summary>
        [JsonProperty(propertyName: "keys")]
        public IList<string> Keys { get; set; }
        /// <summary>
        /// [可选]设置将用于客户端证书校验的 CA 证书。该特性需要 OpenResty 1.19+
        /// </summary>
        [JsonProperty(propertyName: "client.ca")]
        public string ClientCA { get; set; }
        /// <summary>
        /// [可选]设置客户端证书校验的深度，默认为 1。该特性需要 OpenResty 1.19+
        /// </summary>
        [JsonProperty(propertyName: "client.depth")]
        public string ClientDepth { get; set; }
        /// <summary>
        /// [必需]非空数组形式，可以匹配多个 SNI
        /// <code>["www.test.com", "mail.test.com"]</code>
        /// </summary>
        [JsonProperty(propertyName: "sni")]
        public string Sni { get; set; }

        /// <summary>
        /// [可选]标识附加属性的键值对
        /// <code>{"version":"v2","build":"16","env":"production"}</code>
        /// </summary>
        [JsonProperty(propertyName: "labels")]
        public string Labels { get; set; }
        /// <summary>
        /// 是否启用此 SSL, 缺省 1。
        /// <code>1 表示启用，0 表示禁用</code>
        /// </summary>
        [JsonProperty(propertyName: "status")]
        public string Status { get; set; }
    }

}